<template>
	<Layout>
		<div id="container" v-if="pageBlackList"/>
	</Layout>
</template>
<script lang="ts" setup>
import Layout from '@/layout/index.vue';
import { websocketStoreWithOut } from '@/store/modules/websocket';
import { useMenuWithOut } from '@/store/modules/useMenu';
import { getAccessToken } from '@/utils/auth';
const { wsCache } = useCache();
const route = useRoute();
const blackList = ['/login', '/404'];
const pageBlackList = computed(() => {
	return !blackList.includes(window.location.pathname);
})

onMounted(async () => {
	if(pageBlackList.value && getAccessToken()){
		useMenuWithOut().getRouterList(); // 获取客户应用的菜单
		// 刷新即重新连接websocket
		// if(!websocketStoreWithOut().websocketUrl){
			websocketStoreWithOut().connectWebSocket();
		// }
	}
})
</script>
<style>
@import "@/styles/var.css";
@import "@/styles/ui.scss";
@import "@/styles/menu.scss";
@import "@/styles/pageIndex.scss";
</style>
